<?php
namespace app\dao\system;

use app\dao\BaseDao;
use app\model\system\SystemRoute;

/**
 * Class SystemRouteDao
 * @package app\dao\system
 */
class SystemRouteDao extends BaseDao
{

    protected function setModel(): string
    {
        return SystemRoute::class;
    }

    /**
     * @param array $ids
     * @return bool
     */
    public function deleteRoutes(array $ids)
    {
        return $this->getModel()::destroy(function ($q) use ($ids) {
            $q->whereIn('id', $ids);
        }, true);
    }
}
